﻿using Himp.Outpatient;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.DependencyInjection;

namespace Himp.Platform
{
    public class OtpRgstsQuery : ISingletonDependency
    {
        private readonly IServiceProvider _serviceProvider;

        public OtpRgstsQuery(IServiceProvider serviceProvider)
        {
            _serviceProvider = serviceProvider;
        }

        public async Task<PagedResultDto<OtpRgstTypeDto>> GetOtpRgstTypeListAsync(OtpRgstTypeInput input)
        {
            var otpRgstTypeService = _serviceProvider.GetService<IOtpRgstTypeService>();

            return await otpRgstTypeService.GetListAsync(input);
        }

        /// <summary>
        /// 获取门诊挂号记录
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<PagedResultDto<OtpRgstRecDto>> GetOtpRgstRecListAsync(OtpRgstRecInput input)
        {
            var otpRgstRecService = _serviceProvider.GetService<IOtpRgstRecService>();

            return await otpRgstRecService.GetListAsync(input);
        }

        /// <summary>
        /// 获取门诊挂号人员信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task<OtpRgstPsnInfoDto> GetOtpRgstPsnInfoAsync(OtpRgstPsnInfoInput input)
        {
            var otpRgstPsnInfoService = _serviceProvider.GetService<IOtpRgstPsnInfoService>();

            return await otpRgstPsnInfoService.GetAsync(input);
        }
    }
}
